package com.yong.es.pinyin.controller;

import com.yong.es.pinyin.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CourseController {
    @Autowired
    private CourseService courseService;

    @GetMapping("cacheData")
    public Boolean cacheData() {
        return courseService.cacheData();
    }

    @GetMapping("createIndex")
    public Boolean createIndex(){
        return courseService.createIndex();
    }

    @GetMapping("deleteIndex")
    public boolean deleteIndex(){
        return courseService.deleteIndex();
    }
}
